/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#pragma once

#include <lib3d/hard/PointBuffer.h>

#include <GLES/gl.h>
#include <GLES/glext.h>

namespace liba
{
namespace lib3d
{
namespace hard
{
namespace marmalade
{
class Hardware;

class PointBuffer : public hard::PointBuffer
{
	GLuint point_buffer;
	int vertices_count;
	bool valid_flag;

	int stride;
	
	int point_sizes_stride;
	int colors_stride;

public:
	explicit PointBuffer();
	virtual ~PointBuffer();
	virtual bool is_valid()const;
	
	virtual bool update(
						const float * positions, int positions_count,
						const float * diffuse_colors, int diffuse_colors_count,
						const float * sizes, int sizes_count );
	
	virtual void render( int vertex_pos, int primitive_count );
};

} // namespace marmalade
} // namespace hard
} // namespace lib3d
} // namespace liba
using namespace liba;
